<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>&lt;dirent.h&gt;</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_000_003_094">&nbsp;</a>NAME</h4><blockquote>
dirent.h - format of directory entries
</blockquote><h4><a name = "tag_000_003_095">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;dirent.h&gt;
</code>
</pre>
</blockquote><h4><a name = "tag_000_003_096">&nbsp;</a>DESCRIPTION</h4><blockquote>
The internal format of directories is unspecified.
<p>
The
<i>&lt;dirent.h&gt;</i>
header defines the following data type through
<b>typedef</b>:
<dl compact>

<dt>DIR<dd>
A type representing a directory stream.

</dl>
<p>
It also defines the structure
<b>dirent</b>
which includes the following members:
<pre>
<code>
ino_t  d_ino       file serial number
char   d_name[]    name of entry
</code>
</pre>
<p>
The type
<b>ino_t</b>
is defined as described in
<i><a href="systypes.h.html">&lt;sys/types.h&gt;</a></i>.

<p>
The character array
<b>d_name</b>
is of unspecified size, but the number of bytes preceding
the terminating null byte will not exceed {NAME_MAX}.
<p>
The following are declared as functions and may also be defined
as macros.
Function prototypes must be provided for use with an ISO C
compiler.
<pre>
<code>
int            <a href="closedir.html">closedir</a>(DIR *);
DIR           *<a href="opendir.html">opendir</a>(const char *);
struct dirent *<a href="readdir.html">readdir</a>(DIR *);
int            <a href="readdir_r.html">readdir_r</a>(DIR *, struct dirent *, struct dirent **);
void           <a href="rewinddir.html">rewinddir</a>(DIR *);
void           <a href="seekdir.html">seekdir</a>(DIR *, long int);
long int       <a href="telldir.html">telldir</a>(DIR *);
</code>
</pre>
</blockquote><h4><a name = "tag_000_003_097">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_003_098">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_003_099">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="closedir.html">closedir()</a></i>,
<i><a href="opendir.html">opendir()</a></i>,
<i><a href="readdir.html">readdir()</a></i>,
<i><a href="rewinddir.html">rewinddir()</a></i>,
<i><a href="seekdir.html">seekdir()</a></i>,
<i><a href="telldir.html">telldir()</a></i>,
<i><a href="systypes.h.html">&lt;sys/types.h&gt;</a></i>.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
